import Vuex from 'vuex';
import Vue from 'vue';
import createLogger from 'vuex/dist/logger';
import roomlist from './modules/roomlist';
import client from './modules/client';
import userClient from './modules/userClient';

const debug = process.env.NODE_ENV !== 'production';
const modules = Object.assign({}, roomlist, client, userClient);
Vue.use(Vuex);
const store = new Vuex.Store({
    modules: {
        modules
    },
    strict: debug,
    plugins: debug ? [createLogger()] : []
});

export default store;
